using System;
using System.ComponentModel;
using System.Web.UI;
namespace JQueryControlToolkit.Controls
{
	public class ModalPopupExtender : JQueryExtender
	{
        [JQueryElement("appendTo", true)]
        public string AppendTo
        {
            get { return GetPropertyValue<string>("AppendTo", "form:first"); }
            set { SetPropertyValue("AppendTo", value); }
        }

		[JQueryElement("autoOpen")]
		public bool AutoOpen
		{
			get
			{
				return base.GetPropertyValue<bool>("AutoOpen", true);
			}
			set
			{
				base.SetPropertyValue<bool>("AutoOpen", value);
			}
		}
		[JQueryElement("bgiframe")]
		public bool BackgroundIframe
		{
			get
			{
				return base.GetPropertyValue<bool>("BackgroundIframe", false);
			}
			set
			{
				base.SetPropertyValue<bool>("BackgroundIframe", value);
			}
		}
		[JQueryElement("closeOnEscape")]
		public bool CloseOnEscape
		{
			get
			{
				return base.GetPropertyValue<bool>("CloseOnEscape", true);
			}
			set
			{
				base.SetPropertyValue<bool>("CloseOnEscape", value);
			}
		}
		[JQueryElement("dialogClass")]
		public string DialogClass
		{
			get
			{
				return base.GetPropertyValue<string>("DialogClass", null);
			}
			set
			{
				base.SetPropertyValue<string>("DialogClass", value);
			}
		}
		[JQueryElement("draggable")]
		public bool Draggable
		{
			get
			{
				return base.GetPropertyValue<bool>("Draggable", true);
			}
			set
			{
				base.SetPropertyValue<bool>("Draggable", value);
			}
		}
		[JQueryElement("height")]
		public int Height
		{
			get
			{
				return base.GetPropertyValue<int>("Height", -1);
			}
			set
			{
				base.SetPropertyValue<int>("Height", value);
			}
		}
		[JQueryElement("hide")]
		public string HideEffect
		{
			get
			{
				return base.GetPropertyValue<string>("HideEffect", null);
			}
			set
			{
				base.SetPropertyValue<string>("HideEffect", value);
			}
		}
		[JQueryElement("maxHeight")]
		public int MaxHeight
		{
			get
			{
				return base.GetPropertyValue<int>("MaxHeight", -1);
			}
			set
			{
				base.SetPropertyValue<int>("MaxHeight", value);
			}
		}
		[JQueryElement("maxWidth")]
		public int MaxWidth
		{
			get
			{
				return base.GetPropertyValue<int>("MaxWidth", -1);
			}
			set
			{
				base.SetPropertyValue<int>("MaxWidth", value);
			}
		}
		[JQueryElement("minHeight")]
		public int MinHeight
		{
			get
			{
				return base.GetPropertyValue<int>("MinHeight", -1);
			}
			set
			{
				base.SetPropertyValue<int>("MinHeight", value);
			}
		}
		[JQueryElement("modal")]
		public bool Modal
		{
			get
			{
				return base.GetPropertyValue<bool>("Modal", false);
			}
			set
			{
				base.SetPropertyValue<bool>("Modal", value);
			}
		}
		[JQueryElement(null, "position", false, "('((center)|(top)|(bottom)|(left)|(right))')|(\\['((center)|(top)|(bottom)|(left)|(right))',\\ ?('((center)|(top)|(bottom)|(left)|(right))')?\\])|(\\[[0-9]+(,\\ ?[0-9]+)\\])")]
		public string Position
		{
			get
			{
				return base.GetPropertyValue<string>("Position", null);
			}
			set
			{
				base.SetPropertyValue<string>("Position", value);
			}
		}
		[JQueryElement("resizable")]
		public bool Resizable
		{
			get
			{
				return base.GetPropertyValue<bool>("Resizable", true);
			}
			set
			{
				base.SetPropertyValue<bool>("Resizable", value);
			}
		}
		[JQueryElement("show")]
		public string ShowEffect
		{
			get
			{
				return base.GetPropertyValue<string>("ShowEffect", null);
			}
			set
			{
				base.SetPropertyValue<string>("ShowEffect", value);
			}
		}
		[JQueryElement("stack")]
		public bool Stack
		{
			get
			{
				return base.GetPropertyValue<bool>("Stack", true);
			}
			set
			{
				base.SetPropertyValue<bool>("Stack", value);
			}
		}
		[JQueryElement("title", SerializeAs = SerializeAs.String)]
		public string Title
		{
			get
			{
				return base.GetPropertyValue<string>("Title", null);
			}
			set
			{
				base.SetPropertyValue<string>("Title", value);
			}
		}
		[JQueryElement("width")]
		public int Width
		{
			get
			{
				return base.GetPropertyValue<int>("Width", 300);
			}
			set
			{
				base.SetPropertyValue<int>("Width", value);
			}
		}
		[JQueryElement("zIndex")]
		public int ZIndex
		{
			get
			{
				return base.GetPropertyValue<int>("ZIndex", 1000);
			}
			set
			{
				base.SetPropertyValue<int>("ZIndex", value);
			}
		}
		[JQueryEvent("beforeclose"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnClosing
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnClosing", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnClosing", value);
			}
		}
		[JQueryEvent("open"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnOpen
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnOpen", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnOpen", value);
			}
		}
		[JQueryEvent("focus"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnFocus
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnFocus", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnFocus", value);
			}
		}
		[JQueryEvent("drag"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnDrag
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnDrag", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnDrag", value);
			}
		}
		[JQueryEvent("dragStart"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnDragStart
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnDragStart", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnDragStart", value);
			}
		}
		[JQueryEvent("dragStop"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnDragStop
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnDragStop", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnDragStop", value);
			}
		}
		[JQueryEvent("resizeStart"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnResizeStart
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnResizeStart", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnResizeStart", value);
			}
		}
		[JQueryEvent("resize"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnResize
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnResize", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnResize", value);
			}
		}
		[JQueryEvent("resizeStop"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnResizeStop
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnResizeStop", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnResizeStop", value);
			}
		}
		[JQueryEvent("close"), DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), TypeConverter(typeof(JSFunctionConverter)), PersistenceMode(PersistenceMode.InnerProperty)]
		public JSFunctionString OnClose
		{
			get
			{
				return base.GetPropertyValue<JSFunctionString>("OnClose", null);
			}
			set
			{
				base.SetPropertyValue<JSFunctionString>("OnClose", value);
			}
		}
		[JQueryElement("buttons", SerializeAs = SerializeAs.Is), PersistenceMode(PersistenceMode.InnerProperty)]
		public Container<Button> Buttons
		{
			get
			{
				return base.GetPropertyValue<Container<Button>>("Buttons", null);
			}
			set
			{
				this.Controls.AddAt(0, value);
				value.Owner = this;
				base.SetPropertyValue<Container<Button>>("Buttons", value);
			}
		}
		protected override string jQueryFunction
		{
			get
			{
				return "dialog";
			}
		}
	}
}
